home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
729
/
bbbbs
/
bbbbs54.lzh
/
rexx
/
Make_BrowseList.baud
< prev
next >
Wrap
Text File
|
1991-12-05
|
4KB
|
197 lines
/*
$VER: 4.1 Make_BrowseList.baud 17 Nov 1991 (17.11.91)
places archived, user defined, browselist in user's email
the actual archiving is done by ArcBrowse.rexx thru AREXX
copyright 1991 Richard Lee Stockton FREELY DISTRIBUTABLE
*/
SIGNAL ON ERROR
SIGNAL ON SYNTAX
SIGNAL ON FAILURE
SIGNAL ON BREAK_C
SIGNAL ON BREAK_E
CR='0D'x
name=''
ARG name .
IF name='' THEN EXIT(0);
IF GETCLIP('BBS_BROWSE')~='' THEN
DO
SAY 'Sorry, only one archiving at a time. Please try again later.'CR
EXIT(0);
END
CALL SETCLIP('BBS_BROWSE','ON')
figarg='s:CONFIG.BBS'
IF ~EXISTS(figarg) THEN figarg='BBS:BBS_TEXT/CONFIG.BBS'
x=OPEN(f,figarg,'R')
IF x=0 THEN
DO
SAY 's:CONFIG.BBS and BBS:BBS/CONFIG.BBS are both missing!'
CALL SETCLIP('BBS_BROWSE')
EXIT(20)
END
lynes.=''
DO i=1 TO 8
lynes.i=READLN(f)
END
CALL CLOSE(f)
compos=POS('/*',lynes.1)
IF compos>0 THEN lynes.1=LEFT(lynes.1,compos-1)
bbsname = STRIP(lynes.1)
sysop = WORD(lynes.2,1)
bbspath = WORD(lynes.6,1)
IF ~EXISTS(bbspath) THEN
DO
SAY bbspath 'does not exist!'
CALL SETCLIP('BBS_BROWSE')
EXIT(20)
END
testchar=RIGHT(bbspath,1)
IF testchar~='/' & testchar~=':' THEN bbspath=bbspath'/'
libpath = WORD(lynes.8,1)
IF ~EXISTS(libpath) THEN
DO
SAY 'The library path, 'libpath', does not exist!'
CALL SETCLIP('BBS_BROWSE')
EXIT(22)
END
testchar=RIGHT(libpath,1)
IF testchar~='/' & testchar~=':' THEN libpath=libpath'/'
IF ~EXISTS(bbspath'Users/'name) THEN EXIT(1)
SAY CR
SAY 'This background routine will archive a selected list of file'CR
SAY 'descriptions from the' bbsname 'file libraries,'CR
SAY 'The archive will then be saved in email for you.'CR
SAY CR
SAY 'Once you have made your choice of libraries, you will be returned'CR
SAY 'to the main menu(s), and the rest of the process will keep running in'CR
SAY 'the background (ain''t Amiga multi-tasking great?). If the archive'CR
SAY 'is complete before you logout this session, you will be notified online.'CR
SAY CR
OPTIONS PROMPT 'Continue? (nY) '
PULL temp
IF LEFT(temp,1)='N' THEN
DO
CALL SETCLIP('BBS_BROWSE')
EXIT(0);
END
/* get level, lastbrowse, & excludes from userfile */
SAY CR
x=OPEN(f,bbspath'Users/'name,'R')
IF x=0 THEN EXIT(24);
user.=''
DO i=1 TO 16 WHILE ~EOF(f)
line=READLN(f)
END
lastbrowse=STRIP(WORD(line,1))
DO i=17 TO 19 WHILE ~EOF(f)
line=READLN(f)
END
level=READLN(f)
excludes=READLN(f)
CALL CLOSE(f)
x=OPEN(f,bbspath'Numbers/LastFile','R')
IF x=0 THEN EXIT(25);
lastfile=STRIP(READLN(f))
CALL CLOSE(f)
IF lastbrowse<lastfile THEN
DO
OPTIONS PROMPT 'Archive only NEW file descriptions? (yN) '
PULL temp
IF LEFT(UPPER(temp),1)~='Y' THEN lastbrowse=0
END
ELSE lastbrowse=0
SAY CR
OPTIONS PROMPT 'Sort by [L]ibrary or [A]ll files together? (lA) '
PULL libflag
IF libflag~='L' THEN libflag='A'
SAY CR
OPTIONS PROMPT 'Sort by [D]ate or [A]lphabetically? (dA) '
PULL alphaflag
IF alphaflag~='D' THEN alphaflag='A'
SAY CR
OPTIONS PROMPT 'Archive file descriptions from ALL available libraries? (nY) '
PULL doit
IF LEFT(doit,1)~='N' THEN doit='Y'
SAY CR
SAY 'Hang on while I gather the library list...'CR
x=OPEN(f,bbspath'Lists/Libraries','R')
IF x=0 THEN
DO
CALL SETCLIP('BBS_BROWSE')
EXIT(26);
END
libs.=''
DO i=1
line=READLN(f)
IF EOF(f) | line='END' THEN LEAVE i
num=WORD(line,1)
IF DATATYPE(num,'N') THEN
DO
num=num%1
IF num>0 & num<100 THEN libs.num=WORD(line,2)
END
END
CALL CLOSE(f)
SAY CR
liblist=''
DO i=1 TO 99
IF i>level | libs.i='' THEN ITERATE i
IF FIND(UPPER(excludes),UPPER(libs.i))>0 THEN ITERATE i
temp=''
IF doit='N' THEN
DO
OPTIONS PROMPT 'Include the' CENTER(libs.i,16) 'library? yes-no-start-quit-? (yNsq?) '
PULL temp
END
IF temp='?' THEN
DO
SAY CR
SAY 'Y - Yes, include this library in the archive.'CR
SAY 'N - No, skip this library.'CR
SAY 'S - Start archiving with the current library list.'CR
SAY 'Q - Quit without archiving.'CR
SAY CR
i=i-1
END
IF temp='Q' THEN SIGNAL BREAK_E
IF temp='S' THEN LEAVE i
IF doit='Y' | LEFT(STRIP(temp),1)='Y' THEN liblist=STRIP(liblist libs.i)
END
SAY CR
SAY 'Archiving...'CR
SAY 'When completed, the archive will be attached to email addressed to you.'CR
SAY CR
ADDRESS AREXX ArcBrowse.rexx name lastbrowse alphaflag libflag liblist
EXIT(0);
ERROR:
SYNTAX:
FAILURE:
BREAK_C:
BREAK_E:
CALL SETCLIP('BBS_BROWSE')
EXIT(0);
/* end of Make_BrowseList.rexx */